import { FormProps, FormSchema } from '/@/components/Table';
import { BasicColumn } from '/@/components/Table/src/types/table';
import { getJulyDictItemListByTypeApi } from '/@/api/admin/julyDictItemApi';
import { getClassificationTreeApi } from "/@/api/website/websiteClassificationApi";
import { uploadApi } from '/@/api/sys/upload';



//表格显示列
export function getBasicColumns(): BasicColumn[] {
  // @ts-ignore
  return [
    {
      title: 'ID',
      dataIndex: 'messageFeedbackId',
      fixed: 'left',
      width: 100,
    },
    {
      title: '姓名',
      dataIndex: 'commenterName',
      width: 150,

    },
    {
      title: '微信号',
      dataIndex: 'wechat',
      width: 100,
    },
    {
      title: '联系电话',
      dataIndex: 'phoneNo',
      width: 150,
      //sorter: true,
      //defaultHidden: true,
    }

  ];
}

export function getFormConfig(): Partial<FormProps> {
  return {
    labelWidth: 150,
    baseColProps: { lg: 6, md: 24 },
    schemas: formParamSchema,
  };
}


//编辑表单
export const formParamSchema: FormSchema[] = [
  {
    field: 'commenterName',
    label: '姓名',
    component: 'Input',
  },
  {
    field: 'phoneNo',
    label: '联系电话',
    component: 'Input',
  },
  {
    field: 'wechat',
    label: '微信号',
    component: 'Input',
  },
];

//编辑表单
export const formSchema: FormSchema[] = [
  {
    field: 'commenterName',
    label: '姓名',
    component: 'Input',
    required: true,
  }
  ,
  {
    field: 'messageContent',
    label: '留言内容',
    component: 'InputTextArea',
    required: true,
  },
  {
    field: 'wechat',
    label: '微信号',
    component: 'Input',
    required: true,
  },
  {
    field: 'phoneNo',
    label: '联系电话',
    component: 'Input',
    required: true,
  },
];
